<?xml version="1.0" encoding="UTF-8"?>
<dynamic-statement>
	<sql type="SQL" name="find${modelName?cap_first}ByCondition">
		<![CDATA[
		SELECT 
		  tbl.CREATE_TIME AS createTime,
		  tbl.UPDATE_TIME AS updateTime,
		 <#list fields as field>
		 	<#if field_has_next>
		  tbl.${field.tableFieldName} AS ${field.name},
		 	<#else>
		  tbl.${field.tableFieldName} AS ${field.name}
		 	</#if>
		  </#list>
		FROM
		  ${tableName} tbl where 1=1 
		   <#noparse><#if name??></#noparse>
		   	and tbl.name = <#noparse>'${name}'</#noparse>
		   <#noparse></#if></#noparse>
		    order by ID desc
		 ]]>
	</sql>
	
</dynamic-statement>